std::string getBoostVersion()
{
    namespace fs = boost::filesystem;
    fs::path dir_path("/home/shr/MyGitee/boost-search-engine/boost-searcher/data/boost_d");
    //路径不存在，直接返回
    if(!fs::exists(dir_path)) {
        std::cerr << "path not exists" << std::endl;
        return "";
    }
    std::string boostName;
    for (const auto &entry : fs::directory_iterator(dir_path)) {
        if(fs::is_directory(entry)) {
            boostName = entry.path().string();
            break;
        }
    }
    size_t pos = boostName.find('_');
    if(pos == std::string::npos) { std::cerr << "get boost version err" << std::endl; }
    std::cerr << "get boost version: " << boostName.substr(pos) << std::endl;
    return boostName.substr(pos);
}
